package com.negocio;

import java.util.List;

import com.bean.BGenerico;
import com.ibatis.DaoConfig;
import com.ibatis.dao.client.DaoManager;
import com.interfaces.IGenerico;

public class NGenerico {
	
	 protected DaoManager daoManager = DaoConfig.getDaoManager();
	    private IGenerico intefaceBaseDAO;
	    
	    public NGenerico() {
	    	intefaceBaseDAO = (IGenerico) daoManager.getDao(IGenerico.class);
	      
	    }       
	
	
    public BGenerico registrar(BGenerico bean){
    	System.out.println("NGenerico - registrar");
    	return intefaceBaseDAO.registrar(bean);
    }

    public BGenerico actualizar(BGenerico bean){
    	return intefaceBaseDAO.actualizar(bean);
    }

    public void eliminar(BGenerico bean){
    	System.out.println("NGenerico - eliminar");
    	intefaceBaseDAO.eliminar(bean);
    }

    public List listar(){
    	System.out.println("NGenerico - listar");
    	return intefaceBaseDAO.listar();
    }
    
    public List listar(BGenerico bean){
    	return intefaceBaseDAO.listar(bean);
    }
    
    public Long contarFilas(){
    	return intefaceBaseDAO.contarFilas();
    }
    

}
